const app = getApp()
const WXAPI = require("../../../../api/newApi")
Page({

  /**
   * 页面的初始数据
   */
  data: {
    info:{},
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
      statusHeight: app.gettop.height,
      status: app.gettop.status,
      navHeight: app.gettop.navHeight,
      mobbleBottom: app.mobile.mobbleBottom,
    })
    this.getintegralInfo()
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },
  handleChose(){
    wx.navigateBack({
      delta: 0,
    })
  },
  getintegralInfo(){
    WXAPI.integralInfo('', (res) =>{
      if(res.code === 200){
        this.setData({
          info:res.result
        })
      }
    })
  },
  whyFmf(){ 
    wx.showModal({
      title: '什么是蜂蜜分？',
      content: '蜂蜜分，是蜜链盟卡包的通用等价物。用户可以在积分商城中兑换商品、商家服务、商家积分等。',
      confirmText:'我已知悉',
      showCancel:false,
      success(res) {
        if (res.confirm) {
          console.log('用户点击确定')
        } else if (res.cancel) {
          console.log('用户点击取消')
        }
      }
    })
  },
  jumpExchange(){ //去兑换
    wx.navigateTo({
      url: './exchange/exchange',
    })
  },
  exchageRecord(){ //兑换记录
    wx.navigateTo({
      url: './exchangeRecord/exchangeRecord',
    })
  },
  /**
   * 用户点击右上角分享
   */
  // onShareAppMessage: function () {

  // }
})